how to find the middle element of linked list